Jack Flaherty (3-4) fanned a season-high 10 while blanking the Brewers on three hits in seven innings as the Cardinals won for the seventh time in eight games.
Freddy Peralta (4-3) allowed six runs on six hits and five walks in 5 1/3 innings for the Brewers, whose three-game winning streak ended.
Adam Frazier and Anthony Santander each hit a two-run homer and Cedric Mullins added a solo shot for the Orioles.
Raleigh, who went 3-for-5, hit two-run shots in the fifth and sixth innings, logging his second multi-homer game of the season.
Eugenio Suarez also blasted a two-run homer as part of Seattle's 15-hit attack.